<!DOCTYPE html>
<html lang="zh_CN" xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout">
<div class="table-responsive">
    <table class="table table-bordered">
        <thead>
        <tr>
            <th class="text-center">ID</th>
            <th class="text-center" width="35%">消息内容</th>
            <th class="text-center" width="15%">创建人</th>
            <th class="text-center" width="15%">创建时间</th>
            <th class="text-center" width="25%">通知范围</th>
            <th class="text-center" width="5%">状态</th>
            <th class="text-center" width="5%">操作</th>
        </tr>
        </thead>
    </table>
    <div class="J_V_tabContent table-xScrollWrap">
        <table class="table table-bordered table-hover table-xs-content">
            <tbody id="tbodyAffiche">
            <tr class="jqgfirstrow" role="row">
                <th class="text-center"><div class="table-first-id">&nbsp;</div></th>
                <th class="text-center" width="35%">&nbsp;</th>
                <th class="text-center" width="15%">&nbsp;</th>
                <th class="text-center" width="15%">&nbsp;</th>
                <th class="text-center" width="25%">&nbsp;</th>
                <th class="text-center" width="5%">&nbsp;</th>
                <th class="text-center" width="5%">&nbsp;</th>
            </tr>
            <tr th:if="${#lists.isEmpty(dataMap['list'])}">
                <td colspan="7" class="text-center">
                    <div class="noDataTipsBox">
                        <p><span class="c-4e fs16">亲，还没有数据~~~</span></p>
                    </div>
                </td>
            </tr>
            <tr th:if="!${#lists.isEmpty(dataMap['list'])}" th:each="affiche:${dataMap['list']}" th:attr="data-id=${affiche['id']}">
                <td class="text-center">
                    <input type="checkbox" class="i-checks" name="afficheId" th:text="${affiche['id']}">
                </td>
                <td class="text-center" th:utext="${#strings.length(affiche['context'])>200 ? #strings.abbreviate(affiche['context'],260) : #strings.abbreviate(affiche['context'],100)}"></td>
                <td class="text-center">
                    <span th:text="${#maps.isEmpty(affiche['createUser'])} ?'-': ${affiche['createUser']['username']}"></span>
                </td>
                <td class="text-center">
                    <span calss="pie" th:if="${affiche['createTime']}!=null" th:text="${#strings.substring(affiche['createTime'],0,16)}"></span>
                    <span class="pie" th:if="${affiche['createTime']}==null">—</span>
                </td>
                <td class="text-center" th:attr="id='affiche-subject-'+${affiche['id']}">
                    专业/科目:
                    <th:block th:if="!${#lists.isEmpty(affiche['subjectList'])}">
                        <span class="pie" th:each="subject,subIndex : ${affiche['subjectList']}">
                            <th:block th:text="${subject['subjectName']}+'/'"></th:block>
                            <th:block th:if="!${#lists.isEmpty(subject['childSubjectList'])}" th:each="child,index : ${subject['childSubjectList']}">
                                <th:block th:if="${index.last} == false" th:text="${child['subjectName']}+'/'"></th:block>
                                <th:block th:if="${index.last} == true" th:text="${child['subjectName']}"></th:block>
                            </th:block>
                            <th:block th:if="${#lists.isEmpty(subject['childSubjectList'])}">全部科目</th:block>
                            <th:block th:if="${subIndex.last}==false" th:utext="'<br/>'"></th:block>
                        </span>
                    </th:block>
                    <th:block th:if="${#lists.isEmpty(affiche['subjectList'])}">
                        <span class="pie">—</span>
                    </th:block>
                    <br>

                    课程:<span th:if="${affiche['courseList']}!=null" th:each="course,index : ${affiche['courseList']}" th:text="${index.index} lt (${#lists.size(affiche['courseList'])}-1)?${course.courseName}+'/': ${course.courseName}" ></span>
                         <span th:if="${affiche['courseList']}==null or ${#lists.size(affiche['courseList'])}==0">—</span><br>
                </td>
                <td class="text-center status">
                    <span class="label label-info" th:if="${affiche['status']}==0">正常</span>
                    <span class="label label-danger" th:if="${affiche['status']}==1">冻结</span>
                </td>
                <td class="text-center">
                    <a href="javascript:void(0);" class="c-master fs14  afficheInfo" th:attr="data-id=${affiche['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="查看"><i class="fa fa-eye"></i></a>
                    <a href="javascript:void(0);" class="c-master fs14 ml5 deleteAffiche" th:attr="data-id=${affiche['id']}" data-toggle="tooltip" data-placement="bottom" data-original-title="删除"><i class="fa fa-trash-o"></i></a>
                </td>
            </tr>
            </tbody>
        </table>
    </div>
    <!-- 分页，开始 -->
    <div data-th-replace="layout/adminPage"></div>
    <!-- 分页，结束 -->
</div>
